package com.zyh.homework.yichangzuoye.test2;

public class Test {
    public static void main(String[] args) {
        isTriangle(1, 2, 3);
    }

    public static void isTriangle(int a, int b, int c) {
        if (a + b > c && a + c > b && b + c > a) {
            System.out.println("a = " + a);
            System.out.println("b = " + b);
            System.out.println("c = " + c);
        } else {
            throw new IllegalArgumentException(a + "," + b + "," + c + "不能构成三角形");
        }
    }
}

class IllegalArgumentException extends RuntimeException {
    public IllegalArgumentException() {
    }

    public IllegalArgumentException(String message) {
        super(message);
    }
}
